<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/include/taglibs.jsp" %>
<html>
<head>
    <%@include file="/include/header.html" %>
    <script type="text/javascript" src="${ctx}/appjs/elec/elecGun.js"></script>
    <link rel="stylesheet" href="${ctx}/statics/css/common.css?v=20200825">
</head>

<script type="text/javascript">
    $('#topLink', window.parent.document).html(function (i, origText) {
        return '<ol class="breadcrumb">' +
            '<li class="breadcrumb-item">' +
            '<a href="">主页</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<a>设备管理</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<strong>充电枪列表</strong>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<a href="javascript:window.history.back();javascript:window.location.reload()"><i class="fa fa-times"></i> 返回</a>' +
            '</li>' +
            '</ol>';
    });

    var has_add = '';
    var has_edit = '';
    var has_delete = '';
    var Elec_gun_update = false;
    var Elec_gun_look = false;


</script>
<shiro:hasPermission name="Elec_gun_export">
    <script>
        Elec_gun_update = true;
    </script>
</shiro:hasPermission>
<shiro:hasPermission name="Elec_gun_look">
    <script>
        Elec_gun_look = true;
    </script>
</shiro:hasPermission>

<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="col-sm-12">
        <div class="ibox">
            <div class="ibox-body">
                <div class="row">
                    <input id="elecStationId" value="${elecStationId}" type="text" hidden>
                    <input id="elecPileId" value="${elecPileId}" type="text" hidden>
                        <input id="gunNo" name="gunNo" type="text" class="form-control longInput input-distance"
                               placeholder="枪编号">
                        <select type="text" class="form-control shortInput input-distance" name="stationStaus"
                                id="stationStaus">
                            <option value="">服务状态</option>
                            <option value="0">空闲</option>
                            <option value="1">使用中</option>
                            <option value="2">插抢中</option>
                            <option value="3">已充满</option>
                            <option value="4">离线</option>
                            <option value="5">充电中</option>
                            <option value="6">已结束</option>
                            <option value="7">故障</option>
                        </select>
                        <input id="pileSort" name="pileSort" type="text" class="form-control longInput"
                               placeholder="请输入所属充电桩">
                        <input id="stationName" name="stationName" type="text" class="form-control longInput"
                               placeholder="请输入所属充电站">
                        <input id="operatorName" name="operatorName" type="text" class="form-control longInput"
                               placeholder="请输入所属加盟商">
                        <button class="btn btn-success input-distance" style="margin-left:20px;"
                                onclick="elecGun.reLoad()">
                            查询
                        </button>

                    <shiro:hasPermission name="Elec_gun_export">
                        <button class="btn btn-success input-distance exportBtn" style="margin-left: 20px;"
                                onclick="elecGun.exportList()">导出
                        </button>
                    </shiro:hasPermission>
                    <shiro:hasPermission name="Elec_gun_add">
                        <button type="button" style="margin-left:20px;" class="btn  btn-primary"
                                style="margin-left: 4px" onclick="elecGun.addElecGun()">
                            新增充电枪
                        </button>
                    </shiro:hasPermission>
                </div>
                <table id="exampleTable" data-mobile-responsive="true">
                </table>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript">
    elecGun.init();
</script>
</body>
</html>
